﻿using MassPokerTool.Infrastructure.Common;
using MassPokerTool.Infrastructure.Navigation;
using MassPokerTool.Modules.Main.Views;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity;

namespace MassPokerTool.Modules.Main
{
     public class MainModule : IModule
    {
        public void Initialize()
        {
            var regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();

            var container = ServiceLocator.Current.GetInstance<IUnityContainer>();
            container.RegisterType<object, TestView>(ViewNames.TestView);

            regionManager.Navigate(RegionNames.WorkspaceRegion, ViewNames.TestView);
        }
    }
}
